#!/bin/bash
#test-sed-delete.sh

pattern_str="[[CardDataComposer new] loadWithType:MMLoadTypeMore completionBlock:nil];"
substring="["
replacement="\["
pattern_str=${pattern_str//$substring/$replacement}
substring="]"
replacement="\]"
pattern_str=${pattern_str//$substring/$replacement}
echo "pattern_str = $pattern_str"
#pattern_str="[CardDataComposer new]"

sed -i '/'"$pattern_str"'/ {
	d
}' to-delete-file.m

# sed -n '/.*\[\[CardDataComposer new\] loadWithType:.*/ {
# 	p
# 	d
# }' to-delete-file.m